package com.overkill.game;

import android.graphics.Canvas;
import android.graphics.Paint;

public class SpriteRenderable extends Renderable {
	private Sprite sprite;
	
	@Override
	public void update(long gameTime) {
		this.sprite.update(gameTime);
	}

	public SpriteRenderable(Sprite sprite) {
		this.sprite = sprite;
		super.setWidth(this.sprite.getWidth());
		super.setHeight(this.sprite.getHeight());
	}

	@Override
	public void draw(Canvas canvas) {
		this.sprite.drawAt(super.getPosition(), canvas);
	}
	
	@Override
	public void draw(Canvas canvas, Paint paint) {
		this.sprite.drawAt(super.getPosition(), paint, canvas);
	}
	
	public Sprite getSprite() {
		return sprite;
	}

	public void setSprite(Sprite sprite) {
		this.sprite = sprite;
	}
}
